package view.other
{
	import data.Globals;
	
	import flash.display.Sprite;
	import flash.filters.GlowFilter;
	import flash.text.TextField;
	import flash.text.TextFieldAutoSize;
	import flash.text.TextFormat;

	/**
	 * 能量牌 
	 * @author crazy chen
	 * 
	 */	
	public class ScoreView extends Sprite
	{
		private var scoreTf:TextField;
		
		private var _score:int;
		
		public function ScoreView()
		{
			super();
			this.x = -350;
			initface();
		}
		
		private function initface():void
		{
			scoreTf = new TextField();
			this.addChild(scoreTf);
			scoreTf.defaultTextFormat = new TextFormat("Airal",20,0xffff00);
			scoreTf.filters = [new GlowFilter(0x000000)];
			scoreTf.autoSize = TextFieldAutoSize.RIGHT;
			scoreTf.text = score+"";
			scoreTf.y = -scoreTf.height/2;
			scoreTf.mouseEnabled = false;
			scoreTf.selectable = false;
		}

		public function get score():int
		{
			return _score;
		}

		public function set score(value:int):void
		{
			_score = value;
			scoreTf.text = _score + "";
		}

	}
}